Ext.define('Era.view.IconField',{
    extend: 'Ext.form.field.Base',
    alias: 'widget.iconfield',
    lable: null,
    width: 44,
    height: 44,
    
    isFormField: true,
    submitValue: true,
   
    fieldSubTpl: [  
        '<div id="{id}" class="{fieldCls typeCls}"><p style="text-align:center;line-height:40px;font-size:16px">Icon</p></div>',
        {compiled: true,disableFormats: true}           
    ],
    
    overCls: 'over',
    listeners: {
        render : function(c) {
             c.getEl().on('click', function(){ this.fireEvent('click'); }, c);
             c.getEl().setStyle('background-image','url(' + this.getValue() + ')');
             c.getEl().setStyle('background-size','100%');
        }
    }
    
});


